home *** CD-ROM | disk | FTP | other *** search
- Improved Xlib support for release 2.0.1
- ---------------------------------------
-
- This package provides improved Xlib support for Self release 2.0.1.
- The Xlib primitives are now dynamically linked (release 2.0.1 has
- statically linked Xlib primitives). Many primitives have been added;
- in particular, drawing primitives are now present. In addition, it
- should be simpler to add new Xlib primitives by following the examples
- present in xlibTemplates.self and using xlib_glue.make (see the manual
- for details about glue).
-
- This package is compatible with release 2.0.1, including the ui.
- The interface to some of the Xlib objects may have changed slightly.
-
- sun3 is not supported.
-
-
- Files in this package
- ---------------------
-
- README-xlib-support
- This file.
-
- primitiveMaker.self
- (version 8.2)
- This is the same as the file in the patches directory.
-
- xlib.primMaker.h
- Generated by the primitive maker, from xlibTemplates.self.
-
- xlib.self
- (version 8.2.1)
- Along with xlib_wrappers.self, this is the interface to the Xlib
- primitives. (Some of the primitives are further wrapped in
- xlib.self; some are used directly as they exist in xlib_wrappers.self.)
-
- xlib.wrappers.self
- Generated by the primitive maker, from xlibTemplates.self.
-
- xlibPrims.h
- (version 8.0, the same as in release 2.0.1)
- Header file needed by xlib_glue.c.
-
- xlibTemplates.self
- (version 8.1)
- Templates used by the primitive maker to create the glue on the
- C side (xlib.primMaker.h) and on the Self side (xlib_wrappers.self).
- This is the place to add new Xlib primitives. To generate the
- glue files, do "'xlibTemplates.self' _RunScript" at the Self prompt.
-
- xlib_glue.c
- (version 8.1)
- These functions are wrappers for Xlib calls that cannot be directly
- glued in. The functions typically do some extra manipulation of
- incoming arguments before passing them on to the actual Xlib call,
- and may manipulate the result before returning. Most Xlib calls
- do not have to have a separate wrapper in xlib_glue.c, but instead
- can be specified directly in xlibTemplates.self.
-
- xlib_glue.make
- (version 8.1)
- This makefile creates xlib_glue.so, the dynamic library.
-
- xlib_glue.so
- Shared library for sun4.
-
-
- Installation
- ------------
-
- 1. In your Self source directory, place:
-
- primitiveMaker.self (replace the old primitiveMaker.self)
- xlib.primMaker.h
- xlib.self (replace the old xlib.self)
- xlib.wrappers.self
- xlibTemplates.self
- xlib_glue.c
- xlib_glue.make
- xlib_glue.so
-
- 2. If you installed the optional glue package, place xlibPrims.h in
- your glueDefs directory.
-
-
- Use
- ---
-
- Browse through xlibTemplates.self to see what primitives are
- supported. All primitives have Self wrappers defined in
- xlib.wrappers.self; most of them are given a nicer interface in
- xlib.self.
-
- The file "window.self," which can be found in the ftp contrib directory,
- contains a sample window object that you can modify for your own uses.
-
-
- Adding additional Xlib primitives
- ---------------------------------
-
- To add new primitives, you must have installed the optional glue package.
-
- 1. Add templates to xlibTemplates.self. See the existing templates for
- examples; a minimal amount of documentation is available in
- primitiveMaker.self.
-
- 2. In some cases, you may have to create a wrapper function for your
- primitive, in order to munge the arguments to or result from the
- primitive. Put these wrappers in xlib_glue.c.
-
- 3. If you need to introduce a new type seal, add it to the list at
- the top of xlib_glue.c.
-
- 4. Run the primitive maker by doing: 'xlibTemplates' _RunScript
- (The file xlibTemplates.self is actually a single expression,
- which runs the primitive maker on a very long string, the templates).
-
- This should create the two files, xlib.wrappers.self and
- xlib.primMaker.h, in your Self source directory. xlib.wrappers.self
- contains the Self side wrappers for the primitives, and
- xlib.primMaker.h contains the glue for the C side.
-
- 5. Create the shared library by doing: make -f xlib_glue.make
- There may be warnings, which you can probably ignore.
-
- 6. If desired, create another layer on top of the Self wrappers, which
- will be the usual interface to the primitives. This interface
- goes in xlib.self.
-
- 7. When you run Self, the new xlib_glue.so will be loaded when necessary.
-
-
-
- Report bugs in this package to self-bugs@self.stanford.edu.
-